/* You can add global styles to this file, and also import other style files */
@import '~@swimlane/ngx-datatable/release/themes/material.css';
@import '~@swimlane/ngx-datatable/release/assets/icons.css';
@import '~codemirror/lib/codemirror.css';
@import '~@angular/material/theming';
@include mat-core();

/* Theme */
$graviteeio-am-primary-palette: (
  50: #fdfdfd,
  100: #cfd8dc,
  200: #b0bec5,
  300: #90a4ae,
  400: #78909c,
  500: #28444F,
  600: #546e7a,
  700: #455a64,
  800: #37474f,
  900: #263238,
  A100: #cfd8dc,
  A200: #b0bec5,
  A400: #78909c,
  A700: #455a64,
  contrast: (
    50: $dark-primary-text,
    100: $dark-primary-text,
    200: $dark-primary-text,
    300: $dark-primary-text,
    400: $light-primary-text,
    500: $light-primary-text,
    600: $light-primary-text,
    700: $light-primary-text,
    800: $light-primary-text,
    900: $light-primary-text,
    A100: $dark-primary-text,
    A200: $dark-primary-text,
    A400: $light-primary-text,
    A700: $light-primary-text,
  )
);

$graviteeio-am-accent-palette: (
  50: #e3f2fd,
  100: #bbdefb,
  200: #90caf9,
  300: #64b5f6,
  400: #42a5f5,
  500: #86C3D0,
  600: #1e88e5,
  700: #1976d2,
  800: #1565c0,
  900: #0d47a1,
  A100: #82b1ff,
  A200: #448aff,
  A400: #2979ff,
  A700: #2962ff,
  contrast: (
    50: $dark-primary-text,
    100: $dark-primary-text,
    200: $dark-primary-text,
    300: $dark-primary-text,
    400: $dark-primary-text,
    500: $light-primary-text,
    600: $light-primary-text,
    700: $light-primary-text,
    800: $light-primary-text,
    900: $light-primary-text,
    A100: $dark-primary-text,
    A200: $light-primary-text,
    A400: $light-primary-text,
    A700: $light-primary-text,
  )
);

/* Configure theme */
$graviteeio-am-primary: mat-palette($graviteeio-am-primary-palette);
$graviteeio-am-accent:  mat-palette($graviteeio-am-accent-palette);
$graviteeio-am-main-theme: mat-light-theme($graviteeio-am-primary, $graviteeio-am-accent);
@mixin graviteeio-am-theme($theme) {
  $primary: map-get($theme, primary);
  $accent: map-get($theme, accent);
  .gv-sidenav {
    background-color: mat-color($primary, 500);
  }
  .mat-step-header .mat-step-icon-selected, .mat-step-header .mat-step-icon-state-edit, .mat-step-header .mat-step-icon-state-done {
    background-color: mat-color($primary, 500);
  }
  material-add-reference-widget {
    .mat-raised-button.mat-accent {
      background-color: mat-color($primary, 500);
    }
  }
  a {
    color: mat-color($primary, 500);
    &.active, &:hover {
      color: mat-color($accent, 500);
    }
    &.gv-accent-link {
      color: mat-color($accent, 500);
      &:hover {
        color: mat-color($accent, 500);
      }
    }
  }
  .gv-accent-color {
    color: mat-color($accent, 500);
  }
  .application-creation-step1-container {
    .application-creation-step1-content {
      mat-card {
        &.selected, i.selected {
          border: 1px solid mat-color($accent, 500);
        }
      }
    }
  }
  .not-found-content-description {
    border-top: 8px solid mat-color($primary, 500);;
  }
  .gv-splash-screen {
    background: #fdfdfd
  }
}
@include angular-material-theme($graviteeio-am-main-theme);
@include graviteeio-am-theme($graviteeio-am-main-theme);

/* Material Icons */
@font-face {
  font-family: 'Material Icons';
  font-style: normal;
  font-weight: 400;
  src: url(assets/iconfont/MaterialIcons-Regular.eot); /* For IE6-8 */
  src: local('Material Icons'),
  local('MaterialIcons-Regular'),
  url(assets/iconfont/MaterialIcons-Regular.woff2) format('woff2'),
  url(assets/iconfont/MaterialIcons-Regular.woff) format('woff'),
  url(assets/iconfont/MaterialIcons-Regular.ttf) format('truetype');
}

.material-icons {
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;  /* Preferred icon size */
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
  /* Support for all WebKit browsers. */
  -webkit-font-smoothing: antialiased;
  /* Support for Safari and Chrome. */
  text-rendering: optimizeLegibility;
  /* Support for Firefox. */
  -moz-osx-font-smoothing: grayscale;
  /* Support for IE. */
  font-feature-settings: 'liga';
}

html, body, app-root, mat-sidenav-container {
  margin: 0;
  width: 100%;
  height: 100%;
}

body {
  font-family: Roboto,Helvetica Neue Light,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
}

mat-sidenav-container {
  background-color: #ffffff !important;
}

.mat-sidenav {
  overflow-y: initial !important;
}

.main-content {
  overflow: auto;
  margin-top: 60px;
  height: calc(100vh - 60px);
  background-color: #ffffff !important;
}

.mat-list .mat-list-item .mat-list-item-content, .mat-nav-list .mat-list-item .mat-list-item-content {
  position: inherit !important;
}

.browsehappy {
  margin: 0.2em 0;
  background: #ccc;
  color: #000;
  padding: 0.2em 0;
}

.mat-form-field {
  width: 100%;
}

mat-form-field {
  width: 100%;
}

.mat-form-field-appearance-outline .mat-form-field-infix {
  padding: 0.5em 0;
}

.mat-form-field-appearance-outline .mat-form-field-outline {
  background: #fff;
}

.mat-form-field-appearance-outline.mat-form-field-disabled .mat-form-field-outline {
  background: #F1F1F1;
}

ngx-datatable {
  .gv-table-cell-actions {
    margin-left: -10px;
    button, a {
      top: -9px;
      color: grey;
    }
  }
}

.ngx-datatable.material {
  font-size: 14px;
  box-shadow: none;
  background: transparent;
}

.ngx-datatable.material .datatable-footer .datatable-pager {
  ul li:not(:last-child):after {
    content: none;
  }
}

mat-horizontal-stepper {
  border: 1px solid #e2e5e7;
  margin: 5px;
  h5 {
    margin: 0;
  }
  small {
    color: #999;
  }
  button {
    min-width: 100px;
  }
  .stepper-button-zone {
    margin-top: 20px;
    border-top: 1px solid #e2e5e7;
    padding: 10px;
    button {
      min-width: 100px;
    }
  }
  .mat-horizontal-stepper-header-container {
    max-width: 50%;
    margin: 0 auto;
  }
  .mat-horizontal-content-container {
    padding: 24px;
    border-top: 1px solid #e2e5e7;
  }
}

.gv-splash-screen {
  background-image: url('assets/loader.gif');
  background-size: 10%;
  background-repeat: no-repeat;
  background-position: center center;
  bottom: 0;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 99999;
}

.gv-page-container {
  padding: 20px;
  h1 {
    font-weight: 400;
  }
}

.gv-page-description {
  margin-left: 20px;
  h3 {
    font-weight: 400;
  }
  .gv-page-description-content {
    border-top: 1px solid rgb(226, 229, 231);
    p {
      margin-top: 20px;
      font-size: 14px;
    }
    small {
      font-size: 12px;
      color: rgba(0, 0, 0, 0.38);
    }
  }
}

.gv-page-delete-zone {
  color: #f44336;
  font-size: 75%;
  margin-top: 20px;
  padding: 20px;
  border-radius: 2px;
  border: 1px solid #e2e5e7;
  .gv-page-delete-button {
    margin-top: 20px;
  }
}

.gv-form-section {
  padding: 20px;
  background: #fafafa;
  border-radius: 2px;
  border: 1px solid rgb(226, 229, 231);
  margin-bottom: 20px;
  .gv-form-section-title {
    margin-bottom: 10px;
    h5, h4 {
      margin: 0px 0px 5px 0px;
    }
    small {
      display: block;
      margin-bottom: 5px;
      font-size: 75%;
    }
  }
}

.gv-add-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
}

.gv-add-button-center {
  text-align: center;
}

a.gv-back-link {
  text-decoration: none;
  mat-icon {
    vertical-align: middle;
    margin-top: -2px;
  }
}

p.gv-plugin-creation-description {
  text-align: center;
  background: #e3e3e3;
  padding: 20px;
  font-size: 14px;
  margin: 0px 0px 20px 0px;
}

.no-padding-dialog-container .mat-dialog-container {
  padding: 0;
}

div.code {
  overflow: auto;
  white-space: pre;
  background: #f5f5f5;
  border-color: transparent;
  margin-bottom: 24px;
  padding: 0px 20px;
  font-size: 1em;
  button {
    width: auto;
    float: right;
    margin-left: 20px;
  }
  pre {
    width: auto;
    overflow: auto;
    white-space: pre-wrap;
    &.multiline {
      white-space: unset;
    }
  }
}
